<template>
	<view class="search_list">
		<block v-for="(item,index) in goods_list" :key="item.goods_id">
			<navigator :url="'/pages/goods_detail/goods_detail?goods_id='+item.goods_id" open-type="navigate"
				class="search_list_item">
				<view class="image_wrap">
					<image src="https://ww1.sinaimg.cn/large/007rAy9hgy1g24by9t530j30i20i2glm.jpg"></image>
				</view>
				<view class="goods_name">
					{{item.goods_name}}
				</view>
			</navigator>
		</block>
	</view>
</template>

<script>
	export default {
		props: {
			goods_list: {
				// 期望要的数据是 string类型
				type: Array,
				value: [],
			}
		},
		name: "goods-list",
		data() {
			return {

			};
		}
	}
</script>

<style lang="less">
	.search_list {
		padding: 15rpx 26rpx;
	}

	.search_list .search_list_item {
		width: 698rpx;
		height: 209rpx;
		overflow: hidden;
		border-bottom: 1rpx solid #ccc;
	}

	.search_list .search_list_item .image_wrap {
		float: left;
	}

	.search_list .search_list_item .image_wrap image {
		height: 190rpx;
		width: 190rpx;
	}

	.search_list .search_list_item .goods_name {
		font-size: 24rpx;
		margin-top: 26rpx;
		margin-right: 30rpx;
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
</style>